package com.example.barcodeapp.persenter.own;

import com.example.barcodeapp.base.BasePersenter;
import com.example.barcodeapp.common.CommonSubscriber;
import com.example.barcodeapp.interfaces.own.IOwn;
import com.example.barcodeapp.model.HttpManager;
import com.example.barcodeapp.ui.own.bean.KeChengBean;
import com.example.barcodeapp.ui.wode.bean.JiFenBean;
import com.example.barcodeapp.utils.RxUtils;

public class WoDeJiFenPresenter extends BasePersenter<IOwn.JiFenView> implements IOwn.JiFenPresenter {

    @Override
    public void getJiFen(int uid) {
        addSubscribe(HttpManager.getInstance().getOwnTpApi().getJiFen(uid)
                .compose(RxUtils.rxScheduler())
                .subscribeWith(new CommonSubscriber<JiFenBean>(mView) {
                    @Override
                    public void onNext(JiFenBean jiFenBean) {
                        mView.getJiFenBean(jiFenBean);
                    }
                }));
    }
}
